load("@rules_proto//proto:defs.bzl", "proto_library")
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")

proto_library(
    name = "v1_proto",
    srcs = ["resource.proto"],
    strip_import_prefix = "/pkg",
    visibility = ["//visibility:public"],
    deps = ["//pkg/obsservice/obspb/opentelemetry-proto/common/v1:v1_proto"],
)

go_proto_library(
    name = "v1_go_proto",
    compilers = ["//pkg/cmd/protoc-gen-gogoroach:protoc-gen-gogoroach_compiler"],
    importpath = "github.com/cockroachdb/cockroach/pkg/obsservice/obspb/opentelemetry-proto/resource/v1",
    proto = ":v1_proto",
    visibility = ["//visibility:public"],
    deps = ["//pkg/obsservice/obspb/opentelemetry-proto/common/v1:common"],
)

go_library(
    name = "resource",
    embed = [":v1_go_proto"],
    importpath = "github.com/cockroachdb/cockroach/pkg/obsservice/obspb/opentelemetry-proto/resource/v1",
    visibility = ["//visibility:public"],
)
